package com.tzbank.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity(name = "mb_sequence")
@Table(appliesTo = "mb_sequence", comment = "序列表")
public class Sequence extends BaseModel implements Serializable {
	
	private static final long serialVersionUID = -8337725085890612874L;
	
	/**
	 * 序列名
	 */
	@ApiModelProperty(value = "序列名")
	@Column(name = "sequence_name", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '序列名'")
	private String sequenceName;
	
	/**
	 * 开始下标
	 */
	@ApiModelProperty(value = "开始下标")
	@Column(name = "start_subscript", columnDefinition = " bigint(20) DEFAULT NULL COMMENT '开始下标'")
	private long startSubscript;
	
	/**
	 * 结束下标
	 */
	@ApiModelProperty(value = "结束下标")
	@Column(name = "end_subscript", columnDefinition = " bigint(20) DEFAULT NULL COMMENT '结束下标'")
	private long endSubscript;
	
	/**
	 * 步长
	 */
	@ApiModelProperty(value = "步长")
	@Column(name = "step_length", columnDefinition = " bigint(20) DEFAULT NULL COMMENT '步长'")
	private long stepLength;
	
	/**
	 * 当前值
	 */
	@ApiModelProperty(value = "当前值")
	@Column(name = "current_value", columnDefinition = " bigint(20) DEFAULT NULL COMMENT '当前值'")
	private long currentValue;
	
	/**
	 * 是否循环
	 */
	@ApiModelProperty(value = "是否循环")
	@Column(name = "whether_cycle", columnDefinition = " tinyint(1) DEFAULT NULL COMMENT '是否循环'")
	private boolean whetherCycle;
	
	/**
	 * 是否连续
	 */
	@ApiModelProperty(value = "是否连续")
	@Column(name = "whether_continuous", columnDefinition = " tinyint(1) DEFAULT NULL COMMENT '是否连续'")
	private boolean whetherContinuous;
	
}
